home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / _FILE.MIN < prev    next >
Text File  |  1991-08-09  |  14KB  |  693 lines

  1.  
  2.  
  3.  
  4. Name:F:cd
  5. Change the current working directory.
  6. [*]#(ds,value,##(lv,cd))
  7. #(Freadline,Change directory: ,(
  8.     #(sv,cd,##(value))
  9. ))[*]
  10.  
  11.  
  12. Name:F:delete-file
  13. An MS-LOSS file is deleted.
  14. [*]#(Finsist,(arg1),SELF,(
  15.     #(de,#(Fuse-default-ext,arg1))
  16. ))[*]
  17.  
  18.  
  19. Name:F:find-alternate-file
  20. Load the current buffer with a file.
  21. [*]#(Fok-to-trash-buffer,(
  22.     #(==,arg1,,(
  23.         #(ds,value,#(Fbuffer-fn))
  24.         #(Fread-filename,Load: ,##(gs,Fvisit-do))
  25.     ),(
  26.         #(ds,value,arg1)
  27.         #(Fvisit-do)
  28.         #(Fremember-buffer)
  29.         #(an)
  30.     ))
  31. ))
  32. [*]
  33.  
  34.  
  35. Name:F:find-file
  36. Make a buffer current if already loaded, or else load it.
  37. [*]#(==,arg1,,(
  38.     #(ds,value,#(Fbuffer-has-fn,(
  39.         #(Fonly-path,#(Fbuffer-fn))
  40.     ),(
  41.         #(lv,cd)
  42.     )))
  43.     #(ds,F-delete-or-append,
  44.         ##(F-delete-or-append)
  45.         #(ds,F-delete-or-append)
  46.         #(Fread-filename,Find: ,(
  47.             #(SELF,##(value))
  48.         ),dirs okay)
  49.     )
  50. ),(
  51.     #(Fremember-buffer)
  52.     #(ds,temp,#(Fff-with-paths,arg1))
  53.     #(==,##(temp),,(
  54.         #(Ffind-file-do,arg1)
  55.     ),(
  56.         #(Fmultiple,Ffind-file-do,##(temp),SELF)
  57.     ))
  58. ))
  59. [*]
  60.  
  61.  
  62. Name:F:find-file-other-window
  63. [*]#(==,##(lv,ow),0,(
  64.     #(F:split-window-vertically)
  65. ),(
  66.     #(..,#(ba,##(lv,ow)))
  67.     #(Fenter-local-modes)
  68.     #(==,##(lv,cw),1,(#(sv,cw,2)),(#(sv,cw,1)))
  69. ))
  70. #(Ffind-file-other-window-do,arg1)
  71. [*]
  72.  
  73.  
  74. Name:F:find-file-read-only
  75. [*]#(ds,readonly)
  76. #(F:find-file)
  77. #(es,readonly)[*]
  78.  
  79.  
  80. Name:F:insert-file
  81. Insert a file into the current buffer.
  82. [*]#(==,arg1,,(
  83.     #(ds,value,#(Fbuffer-fn))
  84.     #(Fread-filename,Insert-file: ,(
  85.         #(SELF,##(value))
  86.     ))
  87. ),(
  88.     #(ds,temp,#(Fuse-default-ext,arg1))
  89.     #(an,Inserting ##(temp),,...)
  90.     #(Fexecute-and-mark,(
  91.         #(Fr,(
  92.             #(==,ARG1,Read Only,,(#(Ferror,ARG1)))
  93.         ),#(rf,##(temp)))
  94.     ))
  95. ))
  96. [*]
  97.  
  98.  
  99. Name:F:list-directory
  100. Give a directory.  Use the default extension if none is given.
  101. [*]#(ds,line,1)
  102. #(ds,dir-more)
  103. #(Finsist,(arg1),SELF,(
  104.     #(ds,temp)
  105.     #(Fmultiple,Fdir-do,##(ff,arg1,(,)),SELF)
  106.     #(Fdir-do-do,##(temp))
  107.     #(Fhit-any-key)
  108. ))
  109. #(es,line,dir-more)
  110. [*]
  111.  
  112.  
  113. Name:Fdir-do
  114. Deal with one filename in a directory.
  115. [*]#(==,##(temp),,(
  116.     #(ds,temp,arg1)
  117. ),(
  118.     #(g?,##(nc,##(temp)),60,(
  119.         #(SELF-do,##(temp))
  120.         #(ds,temp,arg1)
  121.     ),(
  122.         #(ds,temp,##(temp)( | arg1))
  123.     ))
  124. ))[*]
  125.  
  126.  
  127. Name:Fdir-do-do
  128. [*]#(ds,line,##(++,##(line),1))
  129. #(g?,##(line),##(lv,bl),(
  130.     #(ow,([More?]))
  131.     #(Fcase,#(g),
  132.         (C-m,(#(ds,line,##(lv,bl)))),
  133.         (Return,(#(ds,line,##(lv,bl)))),
  134.         (q,(#(ds,F:list-directory.list)#(ds,line,0))),
  135.         (C-g,(#(ds,F:list-directory.list)#(ds,line,0))),
  136.         (#(ds,line,2))
  137.     )
  138.     #(ow,())
  139. ))
  140. #(g?,##(line),1,(#(ow,arg1(
  141. ))))[*]
  142.  
  143.  
  144. Name:F:rename-file
  145. Rename a file to another name.
  146. [*]#(Finsist,(arg1),SELF,(
  147.     #(Freadline,M-x rename-file-to ,(#(rn,#(Fuse-default-ext,arg1),##(value))))
  148. ))[*]
  149.  
  150.  
  151. Name:F:save-buffer
  152. Write out the current buffer without asking for a filename.
  153. [*]    
  154. #(==,##(lv,mb),0,(
  155.     #(Fmessage,No modifications to save)
  156. ),(
  157.     #(Fbuffer-has-fn,(
  158.         #(Fwrite-file,#(Fbuffer-fn),arg1)
  159.     ),(
  160.         #(F:write-file,arg1)
  161.     ))
  162. ))[*]
  163.  
  164.  
  165. Name:F:save-buffers-kill-emacs
  166. [*]#(ds,unsaved-buffers)
  167. #(Fmaybe-write-abbrevs,(
  168.     #(==,#(Flist-all-strings,modified),,(
  169.         #(Ftrash-buffer,2,##(ba,-1),Fkill-emacs)
  170.     ),(
  171.         #(Fy-or-n,Editor modified - save it?,(
  172.             #(Ftrash-buffer,2,##(ba,-1),Fkill-emacs
  173.                 #(==,ARG1,y,(
  174.                     #(F:save-all-libs)
  175.                 ),(
  176.                     #(ds,unsaved-buffers,##(unsaved-buffers)n)
  177.                 ))
  178.             )
  179.         ))
  180.     ))
  181. ))[*]
  182.  
  183.  
  184. Name:F:save-some-buffers
  185. Write all files that have been modified.
  186. [*]#(Fmaybe-write-abbrevs,(
  187.     #(Ftrash-buffer,2,##(ba,-1),..)
  188. ))[*]
  189.  
  190.  
  191. Name:F:write-file
  192. Write out the current buffer, asking for a filename.
  193. [*]    
  194. #(ds,value,#(Fbuffer-has-fn,(#(Fbuffer-fn))))
  195. #(Fread-filename,Write-file: ,(
  196.     #(==,##(value),,(
  197.         #(SELF)
  198.     ),(
  199.         #(F:set-visited-filename,#(Fuse-default-ext,##(value)))
  200.         #(Fwrite-file,#(Fbuffer-fn),arg1)
  201.     ))
  202. ))[*]
  203.  
  204.  
  205. Name:F:write-region
  206. Write out the region, asking for a filename.
  207. [*]    
  208. #(ds,value,
  209.     #(Fbuffer-has-fn,(
  210.         #(Fonly-path,#(Fbuffer-fn))
  211.     ),(
  212.         #(lv,cd)
  213.     ))
  214. )
  215. #(Fread-filename,Write-region: ,(
  216.     #(==,##(value),,(
  217.         #(SELF)
  218.     ),(
  219.         #(an,Writing region to ##(value))
  220.         #(Fr,(
  221.             #(==,ARG1,,(
  222.                 #(an)
  223.             ),(
  224.                 #(Ferror,ARG1)
  225.             ))
  226.         ),#(wf,##(value),#(Fmark)))
  227.     ))
  228. ))[*]
  229.  
  230.  
  231. Name:Fabsolute-filename
  232. Given a relative filename, absolutize it.
  233. Tests:    The results assume we're on the C drive.
  234. #(Fabsolute-filename,min/min)            c:\emacs\min\min
  235. #(Fabsolute-filename,/min/min)            c:\min\min
  236. #(Fabsolute-filename,foo.bar)            c:\emacs\foo.bar
  237. #(Fabsolute-filename,\foo.bar)            c:\foo.bar
  238. #(Fabsolute-filename,/foo.bar)            c:\foo.bar
  239. #(Fabsolute-filename,c:/foo.bar)        c:\foo.bar
  240. #(Fabsolute-filename,c:\foo.bar)        c:\foo.bar
  241. #(Fabsolute-filename,c:\baz/foo.bar)        c:\baz\foo.bar
  242. #(Fabsolute-filename,c:\baz/foo.bar)        c:\baz\foo.bar
  243. #(Fabsolute-filename,c:\baz//foo.bar)        c:\foo.bar
  244. #(Fabsolute-filename,c:\baz/c:foo.bar)        c:\emacs\foo.bar
  245. #(Fabsolute-filename,c:\baz/c:/foo.bar)        c:\foo.bar
  246. #(Fabsolute-filename,c:\baz\baz\foo.bar)    c:\baz\baz\foo.bar
  247. #(Fabsolute-filename,c:\baz\..\foo.bar)        c:\foo.bar
  248. #(Fabsolute-filename,c:\baz\fie\..\foo.bar)    c:\baz\foo.bar
  249. #(Fabsolute-filename,c:foo.bar)            c:\emacs\foo.bar
  250. #(Fabsolute-filename,d:foo.bar)            d:\foo.bar
  251. [*]#(sv,cd,##(lv,cd),
  252.     #(ds,temp,arg1)
  253.     #(mp,temp,,/)
  254.     #(ds,temp,##(temp,\))
  255.     #(==,#(Fright,##(temp),1),\,(
  256.         #(ds,-SELF,\)
  257.     ))
  258.     #(..,##(go,temp))
  259.     #(==,##(go,temp),:,(
  260.         #(rs,temp)
  261.         #(sv,cd,##(gn,temp,2))
  262.     ),(
  263.         #(rs,temp)
  264.     ))
  265.     #(ds,temp,##(temp))
  266.     #(ds,temp,
  267.         #(==,##(go,temp),\,(
  268.             #(ds,temp1,##(lv,cd))
  269.             ##(gn,temp1,2)
  270.             \##(temp)
  271.         ),(
  272.             #(rs,temp)
  273.             ##(lv,cd)##(temp)
  274.         ))
  275.     )
  276. )
  277. #(Fonly-last,
  278.     ##(gn,temp,2)
  279.     #(mp,temp,,\,:)
  280.     #(SELF-do,#(temp,(,),(,:,)))
  281. )
  282. #(-SELF)
  283. #(es,-SELF)
  284. [*]
  285.  
  286.  
  287. Name:Fabsolute-filename-do
  288. Boy do we have to be tricky here.  If arg2 and arg3 are empty, then we're done,
  289. all we have to do is include the last component of the filename.  If arg2 is
  290. empty, then we must have gotten two slashes, which means restart from root.
  291. The bare comma causes the enclosing Fonly-last to drop the leading junk.  If
  292. we have a .. *after* this, then drop this component of the pathname.
  293. [*]#(Fcase,arg2,
  294.     (,(
  295.         #(==,arg3arg4arg5arg6arg7arg8arg9,,(
  296.             arg1
  297.         ),(
  298.             ,
  299.             #(Fabsolute-filename,\#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
  300.         ))
  301.     )),
  302.     (:,(
  303.         ,
  304.         #(Fabsolute-filename,arg1:#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))
  305.     )),
  306.     (..,(#(SELF,arg3,arg4,arg5,arg6,arg7,arg8,arg9))),
  307.     (
  308.         #(==,arg1,.,,(arg1\))
  309.         #(SELF,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
  310.     )
  311. )[*]
  312.  
  313.  
  314. Name:Fdodotdot
  315. [*][*]
  316.  
  317.  
  318. Name:Fextens-only
  319. Returns only the extension of the filename in arg1.
  320. [*]#(ds,temp,#(Fonly-fn,(arg1)))
  321. #(..,##(fm,temp,.,(##(gn,temp,10000))))
  322. ##(temp)
  323. [*]
  324.  
  325.  
  326. Name:Fff-with-paths
  327. [*]#(ds,path,#(Fonly-path,arg1))
  328. #(Fmultiple,SELF-do,##(ff,arg1,(,)),SELF)[*]
  329.  
  330.  
  331. Name:Fff-with-paths-do
  332. [*]#(ds,temp,arg1 )
  333. #(mp,temp,,#(F-completion-ignored-extensions))
  334. #(==,##(temp),arg1 ,(
  335.     ##(path)arg1(,)
  336. ))[*]
  337.  
  338.  
  339. Name:Ffind-a-file
  340. Search for a file among those given in arg1.  Return arg2 if no matches,
  341. arg3 if one match, arg4 if multiple matches.
  342. [*]#(ds,path,#(Fonly-path,arg1))
  343. #(Ffind-a-match,##(ff,arg1,(,)),(
  344.     arg2
  345. ),(
  346.     #(ds,temp,##(path)##(temp))
  347.     #(es,path)
  348.     arg3
  349. ),(
  350.     #(ds,temp,##(path)##(temp))
  351.     arg4
  352. ),0)[*]
  353.  
  354.  
  355. Name:Ffind-file-do
  356. Decide whether to use an existing buffer or load a new one.
  357. [*]#(==,#(Fright,(arg1),1),\,(
  358.     #(Ddired,arg1)
  359. ),(
  360.     #(ds,value,arg1)
  361.     #(Ffind-buffer,,#(Fuse-default-ext,arg1),(
  362.         #(an,#(Fuse-default-ext,arg1) is already loaded)
  363.     ),(
  364.         #(Ffind-unused-buffer,arg1)
  365.         #(Fvisit-do)
  366.         #(Fremember-buffer)
  367.     ))
  368. ))[*]
  369.  
  370.  
  371. Name:Ffind-file-other-window-do
  372. [*]
  373. #(==,arg1,,(
  374.     #(ds,value,#(Fbuffer-fn))
  375.     #(Fread-filename,Find file in other window: ,(
  376.         #(SELF,##(value))
  377.     ),dirs okay)
  378. ),(
  379.     #(Fremember-buffer)
  380.     #(ds,temp,#(Fff-with-paths,arg1))
  381.     #(==,##(temp),,(
  382.         #(Ffind-file-do,arg1)
  383.     ),(
  384.         #(Fmultiple,Ffind-file-do,##(temp),SELF)
  385.     ))
  386. ))
  387. [*]
  388.  
  389.  
  390. Name:Fnew-extens
  391. Strips the extension off filename (arg1) and appends ext (arg2) to it.
  392. #(Fnew-extens,foo,baz)
  393. #(Fnew-extens,foo.,baz)
  394. #(Fnew-extens,foo.bar,baz)
  395. #(Fnew-extens,c:foo.bar,baz)
  396. #(Fnew-extens,c:/foo.bar,baz)
  397. #(Fnew-extens,c:\foo.bar,baz)
  398. #(Fnew-extens,c:\foo.bar\fee,baz)
  399. #(Fnew-extens,c:\foo.bar\fee.,baz)
  400. #(Fnew-extens,c:\foo.bar\fee.fie,baz)
  401. [*]#(Fonly-path,arg1)
  402. #(ds,temp,#(Fonly-fn,arg1))
  403. ##(fm,temp,.,(##(gn,temp,10000))).arg2
  404. [*]
  405.  
  406.  
  407. Name:Fonly-fn
  408. Split out just the filename from a complete path.
  409. [*]#(ds,-SELF,arg1)
  410. #(mp,-SELF,,\,/,:)
  411. #(Fonly-last,#(-SELF,(,),(,),(,)))
  412. #(es,-SELF)[*]
  413.  
  414.  
  415. Name:Fonly-path
  416. Split out just the path from a complete path.
  417. [*]#(ds,-SELF,arg1)
  418. #(mp,-SELF,,\,/,:)
  419. #(Fall-but-last,#(-SELF,(\,),(\,),(:,)))
  420. #(es,-SELF)[*]
  421.  
  422.  
  423. Name:Fread-file
  424. Read a (small!) file and return the contents.
  425. [*]#(Fexcurse-buffer,(
  426.     #(..,##(ba,1))
  427.     #(pm,1)
  428.     #(sp,])
  429.     #(is,!)
  430.     #(sm,0,<)
  431.     #(rf,arg1)
  432.     #(sp,0)
  433.     #(dm,>)
  434.     ##(rm,])
  435.     #(dm,])
  436.     #(pm)
  437. ))[*]
  438.  
  439.  
  440. Name:Fread-filename
  441. Read a filename, using arg1 as the prompt, arg2 as the thing to do.  If arg3
  442. is non-null, don't complain about specifying directory names.
  443. [*]#(Fcompleting-readline,(arg1),(
  444.     #(==,#(Fright,##(value),1),\arg3,(
  445.         #(Ferror,no directories here)
  446.     ),(
  447.         arg2
  448.     ))
  449. ),(
  450.     #(ds,temp,#(Fabsolute-filename,##(value)##(2nd-half)))
  451.     #(Fff-with-paths,
  452.         #(==,#(Fright,##(gs,temp),1),\,(
  453.             ##(gs,temp)*.*
  454.         ),(
  455.             #(ds,temp1,#(Fonly-fn,##(gs,temp)))
  456.             #(==,##(fm,temp1,.,!!!),!!!,(
  457.                 ##(gs,temp)*.*
  458.             ),(
  459.                 #(rs,temp)
  460.                 ##(gs,temp)*
  461.             ))
  462.         ))
  463.     )
  464. ),.)
  465. [*]
  466.  
  467.  
  468. Name:Fsave-all-files
  469. [*]#(Ffor-all-buffers,SELF-do)[*]
  470.  
  471.  
  472. Name:Fsave-all-files-do
  473. [*]#(Fbuffer-modified,(
  474.     #(Fbuffer-has-fn,(
  475.         #(F:save-buffer)
  476.     ))
  477. ))
  478. [*]
  479.  
  480.  
  481. Name:Fsave-buffer-if-modified
  482. #(Fsave-buffer-if-modified) will save the buffer into
  483. ##(buffer-filename).tmp if the buffer has been modified.
  484. [*]#(Fbuffer-modified,(
  485.     #(Fbuffer-has-fn,(
  486.         #(an,Auto save #(Fnew-extens,#(Fbuffer-fn),tmp),,...)
  487.         #(de,#(Fnew-extens,#(Fbuffer-fn),tmp))
  488.         #(Fwrite-file,#(Fnew-extens,#(Fbuffer-fn),tmp))
  489.     ))
  490. ))
  491. [*]
  492.  
  493.  
  494. Name:Ftrash-buffer
  495. Gives the user a chance to save unsaved changes.  First we check to see if we
  496. should ask the user about saving this buffer.  arg1 is the current buffer,
  497. arg2 is the buffer form which the command was invoked, arg3 is the name
  498. of the function to execute if none of the questions are C-g'ed.
  499. [*]#(==,##(ba,arg1),0,(
  500.     #(arg3,arg2)
  501. ),(
  502.     #(==,#(Fbuffer-modified,(
  503.         #(Fbuffer-has-fn,(
  504.             #(ds,temp,#(Fbuffer-fn))
  505.             #(==,##(go,temp),*,,(
  506.                 yes
  507.             ))
  508.         ))
  509.     )),yes,(
  510.         #(Fy-or-n,Buffer #(Fbuffer-fn) modified - save it?,(
  511.             #(==,ARG1,y,(
  512.                 #(F:save-buffer)
  513.                 #(Fbuffer-modified,n)
  514.             ),(
  515.                 #(ds,unsaved-buffers,##(unsaved-buffers)n)
  516.             ))
  517.             #(SELF,##(++,arg1,1),arg2,arg3)
  518.         ))
  519.     ),(
  520.         #(SELF,##(++,arg1,1),arg2,arg3)
  521.     ))
  522. ))[*]
  523.  
  524.  
  525. Name:Fuse-default-ext
  526. Appends the default extension to the filename if the filename doesn't
  527. already have an extension.
  528. [*]#(ds,temp,arg1)
  529. #(==,##(fm,temp,.,no),no,(
  530.     #(Fnew-extens,arg1,##(F-default-ext))
  531. ),(
  532.     arg1
  533. ))[*]
  534.  
  535.  
  536. Name:Fvisit-do
  537. [*]#(sp,[)
  538. #(dm,])
  539. #(Fbuffer-set-fn,#(Fuse-default-ext,##(value)))
  540. #(an,Loading #(Fbuffer-fn)...)
  541. #(Fvisit-do.#(rf,#(Fbuffer-fn)))
  542. [*]
  543.  
  544.  
  545. Name:Fvisit-do.
  546. [*]#(an)
  547. #(n?,readonly,(
  548.     #(sv,mb,2)
  549. ),(
  550.     #(sv,mb,0)
  551. ))
  552. #(Fvisit-hook)
  553. #(pm,2)
  554. #(sp,[$>$>$>)
  555. #(lp,-*-)
  556. #(l?,[,.,,0,(
  557.     #(sp,0)
  558.     #(ds,temp,##(rm,$))
  559.     #(ds,temp,##(fm,temp,-*-))
  560.     #(mp,temp,, ,##(bc,9,d,a))
  561.     #(Fset-modename,##(temp))
  562.     #(Fenter-local-modes)
  563. ),(
  564.     #(Fset-mode-by-ext)
  565. ))
  566. #(lp,History:)
  567. #(l?,[,.,,0,(
  568.     #(sp,0})
  569.     #(Fgoto-row-and-column,
  570.         #(==,##(rm,>),(,),(
  571.             #(sp,>})
  572.             ##(rm,{)
  573.         ,
  574.             #(sp,{<)
  575.             ##(rm,{)
  576.         ),(
  577.     ,        ##(rm,{)
  578.         ))
  579.     )
  580. ),(
  581.     #(sp,[)
  582. ))
  583. #(pm)
  584. [*]
  585.  
  586.  
  587. Name:Fvisit-do.File not found
  588. [*]#(Fset-mode-by-ext)
  589. #(Fmessage,New file)
  590. [*]
  591.  
  592.  
  593. Name:Fvisit-do.File too large
  594. [*]#(Fkill-buffer)
  595. #(Fmessage,File too large)
  596. [*]
  597.  
  598.  
  599. Name:Fvisit-do.Read Only
  600. [*]#(Fvisit-do.)
  601. #(sv,mb,2)
  602. [*]
  603.  
  604.  
  605. Name:Fwrite-backup-do
  606. [*]#(==,arg1,b,(
  607.     #(de,#(Fnew-extens,#(Fbuffer-fn),bak))
  608.     #(rn,#(Fbuffer-fn),#(Fnew-extens,#(Fbuffer-fn),bak))
  609.     arg2
  610. ),(
  611.     #(==,arg1,C-g,(arg3),(arg2))
  612. ))
  613. [*]
  614.  
  615.  
  616. Name:Fwrite-file
  617. Actually write the file to the filename given in arg1.
  618. If arg2 is zero, don't make a backup, regardless of what F-make-backups says.
  619. Fwrite hook may be used to record change log information.
  620. [*]#(==,#(==,arg2,0,,(#(F-make-backups))),,,(
  621.     #(de,#(Fnew-extens,#(Fbuffer-fn),~))
  622.     #(rn,#(Fbuffer-fn),#(Fnew-extens,#(Fbuffer-fn),~))
  623. ))
  624. #(pm,3)
  625. #(Fwrite-hook)
  626. #(sp,[)
  627. #(Fr,(
  628.     #(==,ARG1,,(
  629.         #(sv,mb,0)
  630.         #(an)
  631.     ),(
  632.         #(sv,mb,1)
  633.         #(Ferror,ARG1)
  634.     ))
  635. ),#(wf,arg1,]))
  636. #(sp,0)
  637. #(pm)
  638. [*]
  639.  
  640.  
  641. Name:Fwrite-hook
  642. If the file has a line containing "History:", the current line number and
  643. column will get inserted following the colon.  If the file has a line
  644. containing "Edit History:" OR if the variable edit-history is set to yes,
  645. then every time you save the file, you will be asked why you are saving
  646. the file, and a line with the time and date and the reason for saving will
  647. be inserted after the "Edit History:" line.
  648.  
  649. The edit-history portion of save has a bug, it appears.  If you save
  650. a file and emacs inserts a line into the file for the edit
  651. history, it fails to adjust for the line it just added in the number
  652. inserted in the file (even when the cursor is below the inserted
  653. line).  The problem also exists that if the cursor is above the
  654. inserted line, then emacs set move the cursor down a line
  655.  
  656. Also, if you have both Edit History and the edit-history variable set
  657. on (as is the default), every line of history inserted gets the word
  658. "Edit" inserted, free of charge.  Maybe you should put the test for
  659. the Edit keyword first.
  660.  
  661. [*]#(ds,temp,##(lv,cl)(,)##(lv,cs))
  662. #(sp,[$>$>$>)
  663. #(lp,History:)
  664. #(l?,[,.,2,1,(
  665.     #(sp,1)
  666.     #(is,0)
  667.     #(sp,<)
  668.     #(dm,})
  669.     #(==,##(rm,>),(,),(
  670.         #(dm,>)
  671.         #(dm,})
  672.     ))
  673.     #(sp,1)
  674.     #(is,##(temp))
  675.     #(sp,2<{)
  676.     #(For,(==,##(rm,2),Edit ),F-edit-history,(
  677.         #(ds,value)
  678.         #(Freadline,Why #(Fbuffer-fn): ,(
  679.             #(==,##(value),,,(
  680.                 #(sp,1^)
  681.                 #(is,##(rm,$))
  682.                 #(Fcrlf)
  683.                 #(sp,2<{)
  684.                 #(==,##(rm,2),Edit ,,(
  685.                     #(sp,2)
  686.                 ))
  687.                 #(dm,1)
  688.                 #(is,##(ct) ##(value))
  689.             ))
  690.         ))
  691.     ))
  692. ))
  693. [*]